# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=hey
pkgver=0.1.3
pkgrel=0
pkgdesc="HTTP load generator"
url="https://github.com/rakyll/hey"
arch="all !mips !mips64" # limited by go
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/rakyll/hey/archive/v$pkgver.tar.gz
	go-vet-fix.patch"

export GOPATH="$srcdir"
export CGO_ENABLED=0

build() {
	go build -v
}

check() {
	go test ./...
}

package() {
	install -Dm755 "$builddir"/$pkgname "$pkgdir"/usr/bin/$pkgname
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="4c2a9ea1797b7345c182c3d80bc55e666e7e66f7e8067fd49fc8fead34756036b126aae7f7a41d6d38014458ad5d5015c6bcd4009b77e35699ce5376aa297b07  hey-0.1.3.tar.gz
cfb9d75dc8c8aec7b4af76a4c47eee60582bab877672faa9ed77a1d8d8f2e08c371790dc598c295f516d32a5df44540208627a9f58a4fe4b917bed76297f99fd  go-vet-fix.patch"
